{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**In contrast to the usually taken %matplotlib inline, we want to have a dedicated window here, where we can just exchange the data being shown.**\n",
    "\n",
    "**It should work with most matplotlib backends, I just took qt5 here.**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib qt5\n",
    "\n",
    "import qkit\n",
    "qkit.cfg['fid_scan_hdf'] = True \n",
    "#qkit.cfg['datadir'] = r'D:\\data\\run_0815' #maybe you want to set a path to your data directory manually?\n",
    "qkit.start()\n",
    "\n",
    "import qkit.gui.notebook.quickplot as qp"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**quickplot will automatically maximize the width of the notebook view. You can suppress this by setting maximize=False**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "q = qp.QuickPlot(maximize=True)\n",
    "q.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " **A number of very basic filtering switches is included.\n",
    " You can enable them below.**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "q.remove_offset_x_avg = False\n",
    "q.remove_offset_y_avg = True\n",
    "q.unwrap_phase = True\n",
    "\n",
    "try: #try to replot the current dataset\n",
    "    q.plot_selected_df(None)\n",
    "except:\n",
    "    pass"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
